package ink.lovejinhu.leetcodeMatch;

/**
 * @author jinhu
 * created 2021-07-18 10:34
 */
public class Solution_5161 {

    public int canBeTypedWords(String text, String brokenLetters) {
        if (text.length() == 0) return 0;
        String[] s = text.split(" ");
        if (brokenLetters.length() == 0) return s.length;
        int res = 0;
        for (int i = 0; i < s.length; i++) {
            for (int j = 0; j < brokenLetters.length(); j++) {
                if (this.contain(s[i], brokenLetters.charAt(j))) {
                    res++;
                    break;
                }
            }
        }
        return s.length-res;
    }

    public boolean contain(String param, char param1) {
        for (int i = 0; i < param.length(); i++) {
            if (param.charAt(i) == param1) return true;
        }
        return false;
    }

    public static void main(String[] args) {
        Solution_5161 solution_5161 = new Solution_5161();

    }
}
